﻿using System;
using Plugins.Base.Common;
using Plugins.UserControls;
using Utils;

namespace Plugins.Base.Historical
{
	[Serializable]
	public class HistoricalSettingsBase : CommonSettingsBase, ICopyable<HistoricalSettingsBase>, ICloneable<HistoricalSettingsBase>
	{
		#region Properties

		public DateSelectorData DateSettings { get; private set; }

		#endregion

		#region Public Methods

		public HistoricalSettingsBase(HourSelectorData hourSelectorData, StockSelectorData stockSelectorData, StockParametersSelectorData stockParametersSelectorData, DateSelectorData dateSelectorData) : base(hourSelectorData, stockSelectorData, stockParametersSelectorData)
		{
			this.DateSettings = dateSelectorData;
		}

		#endregion

		#region ICopyable

		public void Copy(HistoricalSettingsBase source)
		{
			this.DateSettings.Copy(source.DateSettings);
			base.Copy(source);
		}

		#endregion

		#region ICloneable

		public new HistoricalSettingsBase Clone()
		{
			return new HistoricalSettingsBase(base.HourOptions, base.StockSelectionOptions, base.StockParameters, this.DateSettings);
		}

		#endregion
	}
}
